package org.boot.easyapi.enums.permission;

import lombok.Getter;

@Getter
public enum DefaultEnum {

    DEFAULT_PATH(0, "默认放行路径"),
    NOT_DEFAULT_PATH(1, "非默认放行路径");

    private Integer key;
    private String note;

    DefaultEnum(Integer key, String note) {
        this.key = key;
        this.note = note;
    }

    public static DefaultEnum getByKey(Integer key) {
        for (DefaultEnum value : DefaultEnum.values()) {
            if (value.key.equals(key)) {
                return value;
            }
        }
        return null;
    }


}
